package com.lnsf.bookstore.system.admin.service.impl;

import com.lnsf.bookstore.system.admin.service.AdminService;
import com.lnsf.bookstore.system.user.dao.UserMapper;
import com.lnsf.bookstore.system.user.vo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AdminServiceImpl implements AdminService {

	@Autowired
	private UserMapper userMapper;
	

	public User getByUserName(String username) {
		return userMapper.getUserByName(username);
	}


	public Integer saveUser(User user) {
		return userMapper.insert(user);
	}
	

	public User getUserByName_roleAndPer(String username) {
		return userMapper.getUserByName_roleAndPer(username);
	}


	public User getByPhone(String phone) {
		// TODO Auto-generated method stub
		return userMapper.getUserByPhone(phone);
	}

}
